<?php
/**
 * Created by PhpStorm.
 * User: sunshubo
 * Date: 2017/12/19
 * Time: 11:37
 */

class GetImagesInfo_control extends MY_Controller
{
    public function img($id)
    {
        $this->load->model('public/GetImagesInfo_model', 'getInfo');
        $res = $this->getInfo->get_img($id);
        header("content-type: image/png");
        header('Location: '.$res);
        return;
//        $path = 'upload/' . $res;
//        $myFile = fopen($path, "r") or die("Unable to open file!");
//        echo fread($myFile, filesize($path));
//        fclose($myFile);
//        return;
    }
}